﻿using System;
using System.Collections.Generic;
using System.Text;

using Havok4Xna;
using Havok4Xna.Physics.ConstraintSolver;
using Havok4Xna.Physics.Dynamics;
using Havok4Xna.Physics.Collide;

using Microsoft.Xna.Framework;

using System.Reflection;
namespace MyHavokTest {
	public unsafe class Program {
		static void Error(string msg, IntPtr obj) {
			Console.WriteLine(msg);
		}

		static void WalkMemory(IntPtr start, uint size, bool allocated, int pool, IntPtr param) {
			Console.WriteLine("{0},{1},{2},{3}", start, size, allocated, pool);
		}

		static void Main(string[] args) {
			HkMemory mem = new HkPoolMemory();
			HkThreadMemory tmem = new HkThreadMemory(mem);
			tmem.SetStackArea(tmem.Allocate(0x40000, HkMemoryClass.Base), 0x40000);

			HkBaseSystem.Init(mem, tmem, Error, new IntPtr(0x10101010));

			HkBaseSystem.Quit();
		}
	}
}
